<template>
  <div>
    <div>这是首页</div>
    <a-button type="primary" @click="handleChangeTitle">按钮</a-button>
    <div>共享标题{{ state.title }}</div>
  </div>
</template>

<script setup lang="ts">
// import http from '@/service';
import useAppStore from '@/store/modules/app';

// http.Get('/src/service/index.ts').then((res) => {
//   console.log(res);
// });

const { state, setTitle } = useAppStore();

// 修改标题
const handleChangeTitle = () => {
  setTitle('首页标题');
};
</script>

<style scoped></style>
